package com.jiawa.train.business.controller;


import com.jiawa.train.business.req.DailyTrainQueryReq;
import com.jiawa.train.business.resp.DailyTrainQueryResp;
import com.jiawa.train.business.service.IDailyTrainService;
import com.jiawa.train.common.resp.CommonResp;
import com.jiawa.train.common.resp.PageResp;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 每日车次 前端控制器
 * </p>
 *
 * @author hrz
 * @since 2025-09-07
 */
@RestController
@RequestMapping("/daily-train")
@RequiredArgsConstructor
public class DailyTrainController {
    private final IDailyTrainService dailyTrainService;

    @GetMapping("/query-list")
    public CommonResp<PageResp<DailyTrainQueryResp>> queryList(@Validated DailyTrainQueryReq req) {
        PageResp<DailyTrainQueryResp> pa = dailyTrainService.queryList(req);
        return new CommonResp<>(pa);
    }

}
